package com.csk.zsk.compents.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csk.zsk.compents.dao.RankingListDao;
import com.csk.zsk.compents.entity.RankingList;
import com.csk.zsk.compents.service.RankingListService;

@Service
@Transactional
public class RankingListServiceImpl implements RankingListService {

	@Autowired
	private RankingListDao listDao;

	@Override
	public void saveRankingList(RankingList list) {
		listDao.save(list);
	}

	@Override
	public void deleteRankingList(String id) {
		listDao.delete(id);
	}

	@Override
	@Transactional(readOnly = true)
	public RankingList getRankingList(String id) {
		return listDao.getIdByGetMethod(id);
	}

	@Override
	@Transactional(readOnly = true)
	public List<RankingList> getAllRankingList() {
		return listDao.getAll();
	}

}
